package com.kitty.game.hunqiao.message;


import com.kitty.game.enter.FiedValue;
import com.kitty.game.equip.model.EquipField;
import com.kitty.game.hunqiao.model.HunQiaoStoreEquipInfo;
import com.kitty.mina.Modules;
import com.kitty.mina.annotation.MessageMeta;
import com.kitty.mina.message.Message;

import java.util.List;


/**
 * 仓库物品
 */
@MessageMeta(module = Modules.MSG_STORE,cmd = 2)
public class HunQiaoCangKu extends Message {
    private String str;// custom_store fasion_store effect_store normal_store
    private int npcId= 0;
    private List<HunQiaoStoreEquipInfo> list;//装备列表

    public List<HunQiaoStoreEquipInfo> getList() {
        return list;
    }

    public void setList(List<HunQiaoStoreEquipInfo> list) {
        this.list = list;
    }

    public String getStr() {
        return str;
    }

    public void setStr(String str) {
        this.str = str;
    }

    public int getNpcId() {
        return npcId;
    }

    public void setNpcId(int npcId) {
        this.npcId = npcId;
    }

    public void clearMore(){

    }
    public void addMore(){
        this.list.forEach(hunQiaoStoreEquipInfo -> {
            addMore(hunQiaoStoreEquipInfo.getEquipFields());
        });
    }

    /**
     * 加上多余参数
     */
    public static void addMore(List<EquipField> list){
        list.forEach(equipField -> {
            equipField.setType((short)1);
            List<FiedValue> fieldValues = equipField.getFieldValues();
            fieldValues.add(new FiedValue((short)89,(byte)4,""));
            fieldValues.add(new FiedValue((short)264,(byte)4,""));
            fieldValues.add(new FiedValue((short)205,(byte)6,(byte)0));
            fieldValues.add(new FiedValue((short)306,(byte)4,"3131303030303030313031363033353434303839343731"));//最长的
            fieldValues.add(new FiedValue((short)1,(byte)4,"太阴之气"));
            fieldValues.add(new FiedValue((short)261,(byte)2,(short)0));
            fieldValues.add(new FiedValue((short)206,(byte)3,68096));
            fieldValues.add(new FiedValue((short)38,(byte)3,0));
            fieldValues.add(new FiedValue((short)74,(byte)7,(short)31));
            fieldValues.add(new FiedValue((short)34,(byte)3,0));
            fieldValues.add(new FiedValue((short)270,(byte)3,0));
            fieldValues.add(new FiedValue((short)41,(byte)7,(short)8));//type
            fieldValues.add(new FiedValue((short)203,(byte)2,(short)1));//amount
            fieldValues.add(new FiedValue((short)215,(byte)6,(byte)0));//max_req_level
            fieldValues.add(new FiedValue((short)887,(byte)3,0));//deadline
            fieldValues.add(new FiedValue((short)3001,(byte)4,""));//alias
            fieldValues.add(new FiedValue((short)348,(byte)3,0));//limit_use_time
            fieldValues.add(new FiedValue((short)282,(byte)2,(short)0));//combined
            fieldValues.add(new FiedValue((short)207,(byte)3,0));//
        });

    }

}
